﻿/// <reference path="_namespace.js" />



/*****************************************************************************
Ajax library class definition. Kevin Robinson 2008.
Class: ajax.geometry.MeshCollisionEventArgs
/*****************************************************************************/

ajax.lang.addNamespace("ajax.geometry");

//-----------------------------------------------------------------------------
ajax.geometry.MeshCollisionEventArgs = function(e, source, objectToAffect, fRadius, vNewpos, vOldpos, vHitpos, vNormal,
            face, mesh, moveController, matInvParent, matInvController)
{
    ajax.geometry.MeshCollisionEventArgs.superConstructor.call(this, e, source);
    this._initialize(objectToAffect, fRadius, vNewpos, vOldpos, vHitpos, vNormal,
            face, mesh, moveController, matInvParent, matInvController);
}
//-----------------------------------------------------------------------------
ajax.lang.extend("ajax.geometry.MeshCollisionEventArgs", "ajax.events.EventArgs");
if ($getDesignMode())
    ajax.geometry.MeshCollisionEventArgs.prototype = ajax.events.EventArgs.prototype;
//-----------------------------------------------------------------------------


// statics
//-----------------------------------------------------------------------------
ajax.geometry.MeshCollisionEventArgs.cast = function(obj)
{///<returns type="ajax.geometry.MeshCollisionEventArgs"/>
    return obj;
}

// public properties
//-----------------------------------------------------------------------------
ajax.geometry.MeshCollisionEventArgs.prototype._radius              = 0;
ajax.geometry.MeshCollisionEventArgs.prototype._moveController      = null;
ajax.geometry.MeshCollisionEventArgs.prototype._invParentMatrix     = null;
ajax.geometry.MeshCollisionEventArgs.prototype._invControllerMatrix = null;
ajax.geometry.MeshCollisionEventArgs.prototype._newPosition         = null;
ajax.geometry.MeshCollisionEventArgs.prototype._oldPosition         = null;
ajax.geometry.MeshCollisionEventArgs.prototype._hitPosition         = null;
ajax.geometry.MeshCollisionEventArgs.prototype._normal              = null;
ajax.geometry.MeshCollisionEventArgs.prototype._face                = null;
ajax.geometry.MeshCollisionEventArgs.prototype._mesh                = null;
ajax.geometry.MeshCollisionEventArgs.prototype._objectToAffect      = null;

// public accessors
ajax.geometry.MeshCollisionEventArgs.prototype.getRadius = function()
{///<returns type="number"/>
    return this._radius;
}
ajax.geometry.MeshCollisionEventArgs.prototype.getMoveController = function()
{///<returns type="ajax.xna.MoveController"/>
    return this._moveController;0
}
ajax.geometry.MeshCollisionEventArgs.prototype.getInvParentMatrix = function()
{///<returns type="ajax.math.Matrix"/>
    return this._invParentMatrix;
}
ajax.geometry.MeshCollisionEventArgs.prototype.getInvControllerMatrix = function()
{///<returns type="ajax.math.Matrix"/>
    return this._invControllerMatrix;
}
ajax.geometry.MeshCollisionEventArgs.prototype.getNewPosition = function()
{///<returns type="ajax.math.Vector3"/>
    return this._newPosition;
}
ajax.geometry.MeshCollisionEventArgs.prototype.getOldPosition = function()
{///<returns type="ajax.math.Vector3"/>
    return this._oldPosition;
}
ajax.geometry.MeshCollisionEventArgs.prototype.getHitPosition = function()
{///<returns type="ajax.math.Vector3"/>
    return this._hitPosition;
}
ajax.geometry.MeshCollisionEventArgs.prototype.getNormal = function()
{///<returns type="ajax.math.Vector3"/>
    return this._normal;
}
ajax.geometry.MeshCollisionEventArgs.prototype.getFace = function()
{///<returns type="ajax.drawing.Face"/>
    return this._face;
}
ajax.geometry.MeshCollisionEventArgs.prototype.getMesh = function()
{///<returns type="ajax.geometry.Mesh"/>
    return this._mesh;
}
ajax.geometry.MeshCollisionEventArgs.prototype.getObjectToAffect = function()
{///<returns type="ajax.xna.MoveController"/>
    return this._objectToAffect;
}
// initialize with intellisense
//-----------------------------------------------------------------------------
ajax.geometry.MeshCollisionEventArgs.prototype._initialize = function(objectToAffect, fRadius, vNewpos, vOldpos, vHitpos, vNormal,
            face, mesh, moveController, matInvParent, matInvController)
{
    this._objectToAffect    = objectToAffect;
    this._radius            = fRadius;
    this._newPosition       = vNewpos;
    this._oldPosition       = vOldpos;
    this._hitPosition       = vHitpos;
    this._normal            = vNormal;
    this._face              = face;
    this._mesh              = mesh;
    this._moveController         = moveController;
    this._invParentMatrix        = matInvParent;
    this._invControllerMatrix    = matInvController;
}